<?php
$aksi="modul/mod_aktifasi/aksi_aktifasi.php";
switch($_GET[act]){
  // Tampil Aktifasi Member
  default:
    echo "<h2>Data Aktifasi Member</h2>
          <table id='rounded-corner'>
          <thead><tr><th scope='col' class='rounded-company'>No</th><th>Id Member</th><th>Nama Lengkap</th><th>Tanggal Lahir</th><th>Jenis Kelamin</th><th>Gol.Darah</th><th>Aktifasi</th><th>Edit</th><th>Hapus</th></tr></thead>";
    
	$p      = new Paging;
    $batas  = 10;
    $posisi = $p->cariPosisi($batas);

    if ($_SESSION[leveluser]=='admin'){
      $tampil = mysql_query("SELECT * FROM daftar ORDER BY id_member DESC LIMIT $posisi,$batas");
    }
    else{
      $tampil=mysql_query("SELECT * FROM daftar
                           WHERE username='$_SESSION[namauser]'       
                           ORDER BY id_member DESC LIMIT $posisi,$batas");
    }
    
	$no= $posisi+1;
    while ($r=mysql_fetch_array($tampil)){
      echo "<tr><td>$no</td>
                <td>$r[id_member]</td>
				<td>$r[namalengkap]</td>
				<td>$r[tanggallahir]</td>
				<td>$r[jekel]</td>
				<td>$r[gol]</td>
				<td>$r[aktifasi]</td>
                <td><a href=?module=member&act=editmember&id=$r[id_member]><img border=0 title='' alt='' src='images/user_edit.png'></a></td>
				<td><a href='$aksi?module=member&act=hapus&id=$r[id_member]' class='ask'><img border=0 title='' alt='' src='images/trash.png'></a></td>
		    </tr>";
    $no++;
    }
    echo "</table>";
	
			
		if ($_SESSION[leveluser]=='admin'){
      $jmldata = mysql_num_rows(mysql_query("SELECT * FROM daftar"));
    }
    else{
      $jmldata = mysql_num_rows(mysql_query("SELECT * FROM daftar WHERE username='$_SESSION[namauser]'"));
    }  
    $jmlhalaman  = $p->jumlahHalaman($jmldata, $batas);
    $linkHalaman = $p->navHalaman($_GET[halaman], $jmlhalaman);

    echo "<div id=paging>Hal: $linkHalaman</div><br>";
    break;
}
?>
